Skip to content

Fix feed subscribe state and agent cron compatibility#87

Merged
Mr-Lucky merged 6 commits into
mainfrom
feed-state-pull-records
May 22, 2026
Merged

Fix feed subscribe state and agent cron compatibility#87
Mr-Lucky merged 6 commits into
mainfrom
feed-state-pull-records

Conversation

@Mr-Lucky
Copy link
Copy Markdown
Contributor

@Mr-Lucky Mr-Lucky commented May 22, 2026

Summary

  • Store feed subscription state as newest-first pull records with per-run newSeenIds and foundIds
  • Recursively enable AgentGuard Hermes hooks across profile config.yaml files
  • Exclude the managed GoPlus AgentGuard skill from agentguard checkup third-party skill scans
  • Fix OpenClaw/QClaw Gateway cron installation by sending only schema-valid agentTurn payload fields

Testing

  • npm run build
  • node --test dist/tests/feed-cron.test.js
  • node --test dist/tests/cli-subscribe.test.js

Type

  • Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (32 tests)
  • Manually tested the change

Related Issues

Closes #86

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

AgentGuard PR Review

I found one actionable issue in the patch.

  1. severity: mediumsrc/feed/state.ts / src/cli.ts (subscribe path)
    • What can go wrong: The new feed state format only remembers IDs from prior runs, but getSeenAdvisoryIds() is derived from newSeenIds only. A record with empty newSeenIds but non-empty foundIds is persisted, yet contributes nothing to deduplication. More importantly, subscribe now skips saving state entirely when newSeenIds.length === 0 && foundIds.length > 0 is false, so a run that only re-evaluates already-seen advisories (or only detects matches after all advisories are already known) will not update pulledAt/record history. This makes the local ledger incomplete and can cause repeated reprocessing or misleading state after cron runs.
    • Concrete fix: Persist a pull record whenever the feed was queried and any advisories were evaluated, not only when newSeenIds or foundIds are non-empty. Also consider deriving dedupe from the union of all stored record IDs, or explicitly documenting/validating that foundIds never needs to influence skip logic.

@Mr-Lucky Mr-Lucky merged commit 5700c8c into main May 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checkup 误报自身安全风险

1 participant